package com.app.shop.util;

import java.io.Serializable;

/**
 * @Author :chenliwei
 * @Description:
 * @Date: create in 16:05 2019-1-27.
 * @Modified by:
 */
public class ApiRest<T> implements Serializable{

    public ApiRest(){}
    public ApiRest(Integer  code,String  message){
        this.code=code;
        this.message=message;
    }

    public ApiRest(Integer  code,String  message,T data){
        this.code=code;
        this.message=message;
        this.data=data;
    }

    /**
     * 处理状态 200 500 403 401
     */
    private Integer  code;
    /**
     * 返回信息
     */
    private String  message;
    /**
     * 返回数据
     */
    private T data;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
